import java.io.File;
import java.io.IOException;

public class Java02 {
    public static void main(String[] args) throws IOException {
        File file=new File("d://abc//aaa//bbb");
        file.mkdirs();
        System.out.println(file.exists());
        File f1=new File("d://abc//aaa//bbb//a.txt");
        File f2=new File("d://abc//aaa//b.txt");
        File f3=new File("d://abc//c.txt");
        f1.createNewFile();f2.createNewFile();f3.createNewFile();
        deletFile(new File("d://abc"));
    }
    public static void deletFile(File file){
            if (file.isFile()){
                System.out.println("删除"+file.getName());
                file.delete();
            } else if (file.isDirectory()) {
                File[] files=file.listFiles();
                for (File f:files){
                    deletFile(f);
                }
                System.out.println("删除"+file.getName());
                file.delete();
            }
        }
}
